<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0px;
    }
    .p1 {
      width: 230px;
      height: 400px;
      overflow: auto;
    }
    .p2 {
      width: 200px;
      height: 300px;
      position: sticky;
      z-index: 1;
      top: 0px;
      left: 0px;
      background-color: brown;
    }

    p {
      width: 230px;
      background-color: aqua;
      opacity: 0.5;
    }
  </style>
</head>
<body>
  <div class="p1">
    <div class="p2">
      
    </div>
    <p>01</p>
    <p>02</p>
    <p>03</p>
    <p>04</p>
    <p>05</p>
    <p>06</p>
    <p>07</p>
    <p>08</p>
    <p>09</p>
    <p>10</p>
    <p>11</p>
    <p>12</p>
    <p>13</p>
    <p>14</p>
    <p>15</p>
    <p>16</p>
    <p>17</p>
    <p>18</p>
    <p>19</p>
    <p>20</p>
  </div> 
</body>
</html>